import { PrismaClient } from '@prisma/client'

module.exports = {

    async init() {

        const prisma = new PrismaClient()
        const devices = await prisma.device.findMany();
        console.log("devices",devices)

        // const filePath = `store/flows/`;
        // ensureDirExistence(filePath);
        // fs.readdirSync(filePath).forEach(f => {
        //     if (f.endsWith('.json')) {
        //         const content = fs.readFileSync(filePath + '/' + f, 'utf-8');
        //         const data = JSON.parse(content);
        //         const flow = new Flow(data);
        //         const uuid = flow.uuid;
        //         flowMapping[uuid] = flow;
        //     }
        // });
        // this.startAll();
    }
};